package com.hzhr.iot.collect.protocol.parser;

import com.hzhr.iot.collect.constant.MessageFieldKeyEnum;
import com.hzhr.iot.collect.constant.UpDownEnum;
import com.hzhr.iot.collect.protocol.checker.Checker;
import com.hzhr.iot.collect.protocol.decipher.Decipher;
import com.hzhr.iot.collect.protocol.encipher.Encipher;

import java.util.Map;

public interface Parser {
    Decipher getDecipher();
    Encipher getEncipher();
    Checker getChecker();

    Map<MessageFieldKeyEnum, Object> parsing(String message, int protocolId, String deviceId, UpDownEnum upDownFlag) throws Exception;

    String inverselyParsing(Map<MessageFieldKeyEnum, Object> messageObj, int protocolId, String deviceId, UpDownEnum upDownFlag) throws Exception;
}
